package main

import (
	"github.com/astaxie/beego"
	"zhhuiyan/controllers"
	/*"github.com/lxn/walk"
	. "github.com/lxn/walk/declarative"*/
)

func main() {
	//	var wv *walk.WebView
	beego.SetStaticPath("/public", "static")
	beego.SetStaticPath("/upload", "upload")
	beego.SetStaticPath("/images", "img")
	beego.SetStaticPath("/css", "css")
	beego.SetStaticPath("/js", "js")
	beego.SetStaticPath("/yaml", "yaml")
	beego.Router("/", &controllers.MainController{})
	beego.Router("/test", &controllers.TestController{})
	beego.RESTRouter("/model", &controllers.ModelController{})
	beego.RESTRouter("/article", &controllers.ArticleController{})
	beego.Router("/article/add", &controllers.ArticleController{}, "get:Add")
	beego.Router("/article/edit", &controllers.ArticleController{}, "post:Edit")
	beego.RESTRouter("/image", &controllers.ImageController{})
	beego.Router("/image/add", &controllers.ImageController{}, "get:Add")
	beego.Router("/image/edit", &controllers.ImageController{}, "post:Edit")
	beego.Run()
	/*MainWindow{
	Title:   "Walk WebView Example",
	MinSize: Size{800, 600},
	Layout:  VBox{},
	Children: []Widget{
			LineEdit{
			AssignTo: &le,
			Text:     Bind("wv.URL"),
			OnKeyDown: func(key walk.Key) {
				if key == walk.KeyReturn {
					wv.SetURL(le.Text())
				}
			},
		},
	WebView{
	AssignTo: &wv,
	Name:     "wv",
	URL:      "http://localhost:8080",
},
},
}.Run()*/

}

